#ifndef POSFILEINFO_H
#define POSFILEINFO_H

#include <QPointF>
#include <QMap>


#define FE_WGS84    (1.0/298.257223563) /* earth flattening (WGS84) */
#define RE_WGS84    6378137.0           /* earth semimajor axis (WGS84) (m) */

#define PI          3.1415926535897932  /* pi */
#define D2R         (PI/180.0)          /* deg to rad */
#define R2D         (180.0/PI)          /* rad to deg */

class PosFileInfo
{
public:
    PosFileInfo(void);
    PosFileInfo(QString& fn);
    ~PosFileInfo();

    bool readPos(void);

    QString& getPosMsg(void);

    QMap<QString, QPointF>& getPoints(void);

private:
    void pos2ecef(const double *pos, double *r);

private:

    QString fileName;

    QMap<QString, QPointF> pointMap;

    qint64 posCountSum;
    qint64 fixPosCount;
    qint64 floatPosCount;
    qint64 sigPosCount;

    QString infoString;
};

#endif // POSFILEINFO_H
